/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package managers;

import classes.Medico;
import java.io.PrintWriter;

/**
 *
 * @author Davide Bonomelli, Valentino Briani
 */
public class GUIManager {
    private PrintWriter out;
    
    public GUIManager(PrintWriter newOut){
        this.out=newOut;
    }
    
    public void printPage(String titolo, String menu, Medico medico, String contenuto) {
        try {
            this.out.println(
                    "<html>\n"
                    + "<html>\n"
                    + "<head>\n"
                    + "<title>I Provetta di Programmazione per il Web</title>\n"
                    + "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\" />\n"
                    + "<meta name=\"Keywords\" content=\"\" />\n"
                    + "<meta name=\"Description\" content=\"\" />\n"
                    + "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../../WelcomeMedico/css/style.css\" />\n"
                    + "</head>\n"
                    + "<body>\n"
                    + "<div id=\"container\">\n"
                    + "<div id=\"left\">\n"
                    + menu
                    + "</div>\n"
                    + "<div id=\"right\">\n"
                    + "<div id=\"myData\">\n"
                    + "<h4>Nome:</h4><p>" + medico.getNome() + "</p>\n"
                    + "<h4>Cognome:</h4><p>" + medico.getCognome() + "</p>\n"
                    + "<h4>Ultimo accesso:</h4><p>" + medico.getUltimoAccesso() + "</p>\n"
                    + "</div>\n"
                    + "<div id=\"formOption\">\n"
                    + "<h4>" + titolo + "</h4>\n"
                    + "</div>\n"
                    + contenuto
                    + "</div>\n"
                    + "</div>\n"
                    + "</body>\n"
                    + "</html>"
                    );
        } finally {            
            out.close();
        }
    }
}
